package com.anxin.act.task.service;

import java.util.List;

import com.anxin.act.task.dao.ViewHiTaskDao;
import com.anxin.act.task.entity.ViewHiTask;
import com.anxin.act.task.entity.ViewRuTask;
import com.anxin.framework.web.service.BaseService;
import com.anxin.common.utils.SecurityUtils;
import com.anxin.sys.system.entity.SysUser;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 流程历史任务Service业务层处理
 *
 * @author jbs
 * @date 2021-10-25
 */
@Service
public class ViewHiTaskService extends BaseService<ViewHiTaskDao, ViewHiTask>{
    @Autowired
    private ViewHiTaskDao viewHiTaskDao;

    /**
     * 查询流程历史任务
     *
     * @param id VIEWID
     * @return 流程历史任务
     */
    public ViewHiTask getById(String id){
        return viewHiTaskDao.getById(id);
    }

    /**
     * 查询流程历史任务列表
     *
     * @param viewHiTask VIEW
     * @return 流程历史任务
     */
    public List<ViewHiTask> findList(ViewHiTask viewHiTask){
        List<ViewHiTask> hiList = viewHiTaskDao.findList(viewHiTask);
        for (ViewHiTask hiTask : hiList) {
            hiTask.intiData();
        }
        return hiList;
    }

    /**
     * 查询流程历史任务列表
     *
     * @param viewHiTask VIEW
     * @return 流程历史任务
     */
    public List<ViewHiTask> findPage(ViewHiTask viewHiTask){
        startPage();
        return this.findList(viewHiTask);
    }


}
